package day24;

import java.io.*;

public class Demo1 {
    public static void main(String[] args) {
        try(FileInputStream fis = new FileInputStream("D:\\a\\abc.mp4");){
            FileOutputStream fos = new FileOutputStream("D:\\b\\abc.mp4");
            BufferedInputStream bis = new BufferedInputStream(fis);
            BufferedOutputStream bos = new BufferedOutputStream(fos);
            long start = System.currentTimeMillis();
            byte[] buf = new byte[1024];
            int len=0;
            while((len=bis.read(buf))!=-1){
                bos.write(buf, 0, len);
            }
            long end = System.currentTimeMillis();
            System.out.println(end-start);
            bos.flush();
            bos.close();
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
